<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{{.i18n.wide_title}}</title>

    <meta name="keywords" content="Wide, Golang, IDE, Cloud, B3log, Login"/>
    <meta name="description" content="A Web-based Go IDE , do your development anytime, anywhere."/>
    <meta name="author" content="B3log">

    <link rel="stylesheet" href="/static/css/base.css?{{.conf.StaticResourceVersion}}">
    <link rel="stylesheet" href="/static/css/sign.css?{{.conf.StaticResourceVersion}}">
    <link rel="icon" type="image/x-icon" href="/favicon.ico"/>
    {{if ne "" .conf.SiteStatCode}}
    {{.conf.SiteStatCode}}
    {{end}}
</head>
<body>
<div class="header">
    <div class="login menu-title">
        <img src="/static/images/chainmakerLOGO.svg">
        ChainMaker SmartEditor
    </div>
</div>
<div class="login-content">
    <div class="wrapper fn-clear">

        <div class="form fn-right start">
            <div class="login-title">ChainMaker SmartEditor</div>
            <a href="">
                <img src="/static/images/chainmakerLOGOLogin.svg">
            </a>
            <div class="login-info">你可以使用长安链官网账号或者gitlab账号登录ChainMaker SmartEditor，如您未注册请先注册</div>
            <div class="start__aciton">
                <div onclick="toLog()" class="btn">注册</div>
                <span>&nbsp; &nbsp;</span>
                <div onclick="toLog()" class="btn">登录</div>
            </div>
        </div>
    </div>
    <script>
        var org = window.location.origin;
        var cm_version = {
            '2.1.0':'https://ide.chainmaker.org.cn',
            '2.3.0':'https://ide230.chainmaker.org.cn',
        };
        function toLog(){
            var version = localStorage.getItem(`local-ide-version`);
            if(version&&cm_version[version]!== org){
                window.location.href = cm_version[version]+'/login/redirect?auth_server=CHAINMAKER';
                return;
            }
            window.location.href = org+'/login/redirect?auth_server=CHAINMAKER';
        }
    </script>
</div>
</body>
</html>
